var NotificationCollect = require('../models').NotificationCollect;

exports.getNotificationCollect = function (userId, notificationId, callback) {
  NotificationCollect.findOne({user_id: userId, notification_id: notificationId}, callback);
};

exports.getNotificationCollectsByUserId = function (userId, callback) {
  NotificationCollect.find({user_id: userId}, callback);
};

exports.newAndSave = function (userId, notificationId, callback) {
  var notification_collect = new NotificationCollect();
  notification_collect.user_id = userId;
  notification_collect.notification_id = notificationId;
  notification_collect.save(callback);
};

exports.remove = function (userId, notificationId, callback) {
  NotificationCollect.remove({user_id: userId, notification_id: notificationId}, callback);
};

